import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWechatTagsController } from '../../../controllers';
const uctoowechatTagsRouter = new Router();
const wechatTagsController = new uctooWechatTagsController();

uctoowechatTagsRouter.post('/add', requireUser, wechatTagsController.add);
uctoowechatTagsRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wechat_tags'), wechatTagsController.edit);
uctoowechatTagsRouter.post('/del', requireUser, rowLevelPermission('uctoo/wechat_tags'), wechatTagsController.delete);

//For getting wechatTags with permission control
uctoowechatTagsRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wechat_tags'), wechatTagsController.getSingle);
uctoowechatTagsRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wechat_tags'), wechatTagsController.getMany);
uctoowechatTagsRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wechat_tags'), wechatTagsController.getMany);

//#endregion AutoCreateCode
export default uctoowechatTagsRouter;
